<!DOCTYPE HTML>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-task-edit">
        <input id="id" name="id" th:value="${task.id}" type="hidden">
        <div class="form-group">
            <label class="col-sm-3 control-label">任务名：</label>
            <div class="col-sm-8">
                <input id="name" name="name" th:value="${task.name}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">执行类：</label>
            <div class="col-sm-8">
                <input id="jobClass" name="jobClass" th:value="${task.jobClass}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">任务说明：</label>
            <div class="col-sm-8">
                <input id="note" name="note" th:value="${task.note}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">定时规则：</label>
            <div class="col-sm-8">
                <input id="cron" name="cron" th:value="${task.cron}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">执行参数：</label>
            <div class="col-sm-8">
                <input id="data" name="data" th:value="${task.data}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">执行时间：</label>
            <div class="col-sm-8">
                <input id="exeAt" name="exeAt" th:value="${task.exeAt}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">执行结果：</label>
            <div class="col-sm-8">
                <input id="exeResult" name="exeResult" th:value="${task.exeResult}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">状态：</label>
            <div class="col-sm-8">
<!--                <input id="status" name="status" th:value="${task.status}" class="form-control" type="text">-->
                <div class="onoffswitch">
                    <input type="checkbox" th:checked="${task.status ? true : false}" class="onoffswitch-checkbox" id="status" name="status">
                    <label class="onoffswitch-label" for="status">
                        <span class="onoffswitch-switch"></span>
                        <span class="onoffswitch-inner"></span>
                    </label>
                </div>
            </div>
        </div>

        <!--<div class="form-group">
            <label class="col-sm-3 control-label">创建者：</label>
            <div class="col-sm-8">
                <input id="createBy" name="createBy" th:value="${task.createBy}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">创建时间：</label>
            <div class="col-sm-8">
                <input id="createTime" name="createTime" th:value="${task.createTime}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">更新者：</label>
            <div class="col-sm-8">
                <input id="updateBy" name="updateBy" th:value="${task.updateBy}" class="form-control" type="text">
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">更新时间：</label>
            <div class="col-sm-8">
                <input id="updateTime" name="updateTime" th:value="${task.updateTime}" class="form-control" type="text">
            </div>
        </div>-->
        <div class="form-group">
            <label class="col-sm-3 control-label">备注信息：</label>
            <div class="col-sm-8">
                <input id="remark" name="remark" th:value="${task.remark}" class="form-control" type="text">
            </div>
        </div>
    </form>
</div>
<div th:include="include::footer"></div>
<script type="text/javascript">
    var prefix = ctx + "sys/task";
    $("#form-task-edit").validate({
        onkeyup: false,
        rules: {
            xxxx: {
                required: true,
            },
        }
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/editDo", $('#form-task-edit').serialize());
        }
    }
</script>
</body>
</html>
